-- GENERATED SPELL FOR [Wyrmcult Scout] --


function spell0_21637(pUnit, Event) --@Blessing of the Black,Self--
pUnit:FullCastSpellOnTarget(37635,pUnit)
pUnit:RegisterEvent('Sorts_21637', 4100, 1)
end

function spell1_21637(pUnit, Event) --@Fire Nova,Self--
pUnit:FullCastSpellOnTarget(11969,pUnit)
pUnit:RegisterEvent('Sorts_21637', 2000, 1)
end

function spell2_21637(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21637', 3000, 1)
end

function spell3_21637(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21637', 585, 1)
end

function Sorts_21637(pUnit, Event)
local choix_sorts_21637 = math.random(0, 3)
if choix_sorts_21637 == 0 then
pUnit:RegisterEvent('spell0_21637', 1, 1)
end
if choix_sorts_21637 == 1 then
pUnit:RegisterEvent('spell1_21637', 1, 1)
end
if choix_sorts_21637 == 2 then
pUnit:RegisterEvent('spell2_21637', 1, 1)
end
if choix_sorts_21637 == 3 then
pUnit:RegisterEvent('spell3_21637', 1, 1)
end
end

function mob21637_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21637', math.random(1500, 3000), 1)
end

function mob21637_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21637_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21637_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21637, 1, 'mob21637_Action')
RegisterUnitEvent(21637, 2, 'mob21637_Leave')
RegisterUnitEvent(21637, 3, 'mob21637_Kill')
RegisterUnitEvent(21637, 4, 'mob21637_Die')
